Release 10.1A: OpenEdge Development:
Programming Interfaces


ToolTips

A ToolTip is a short string that appears in an enclosing rectangle when the user pauses the mouse pointer over a field-level widget. ToolTips are widely used in Windows applications. For example, ToolTips are often used to provide labels for toolbar buttons, as shown in Figure 10–3.

Figure 10–3: ToolTip example

You can assign a ToolTip to any field-level object such as a button, combo box, editor, fill-in field, image, radio set, selection list, slider, text, and toggle box.

Implementing ToolTips with the Progress 4GL

To implement ToolTips, you specify the ToolTip text in the TOOLTIP attribute of the associated object and set the TOOLTIPS attribute of the SESSION system handle to TRUE.

TOOLTIP attribute

Each object for which the TOOLTIP option is implemented has a run-time attribute, called TOOLTIP, established with read/write capabilities. If the TOOLTIP attribute is set to "" or the Unknown value (?), then no ToolTip is displayed for that object. The default is to not have a ToolTip. You can add a ToolTip to an object at any time.

Here is the syntax for the TOOLTIP option:

Syntax
[ TOOLTIP tooltip ] 

tooltip

A quoted string containing the text that displays when the user pauses the mouse pointer over the object.

The following code example shows how to specify the ToolTip attribute at run time:

 Btn_OK:TOOLTIP = "Select this button to accept the information." 

You can use the TOOLTIP option with the following 4GL elements:

TOOLTIPS attribute

There is a session attribute called TOOLTIPS. The session default setting for TOOLTIPS is on (TRUE). To turn TOOLTIPS off for the session, set the TOOLTIPS session attribute to FALSE, for example:

SESSION:TOOLTIPS=FALSE 

For more information on session attributes, see OpenEdge Development: Progress 4GL Reference .

Implementing ToolTips with the AppBuilder

The OpenEdge AppBuilder tool allows you to define ToolTips by entering ToolTip text in an object’s property sheet.

To define ToolTips using the AppBuilder tool:

  1. Open a design window in the AppBuilder.
  2. Select a field-level object (such as a button) in the design window, then choose the Object Properties button to open its property sheet.
  3. Type some help text in the Tooltip fill-in field:
  4. Note: The Help ID field is not related to ToolTips. It is for specifying an identifier for the help topic (in a help file) associated with this object.

  5. Choose OK, then Save the window.
  6. Run the window and pass the mouse cursor over the object. The ToolTip appears in a rectangular box:

Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095